package com.example;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.example.dao.UserInfoDAO;
import com.example.entity.UserInfo;

@Controller
@RequestMapping("a")
public class DemoWeb {
	
	@Autowired
	private UserInfoDAO userDao;
	
	@RequestMapping("b")
	@ResponseBody
	public String list(){
		Iterable<UserInfo> findAll = userDao.findAll();
		for (UserInfo userInfo : findAll) {
			System.out.println(userInfo);
		}
		return "dddd";
	}
}
